package com.gfm.story.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.gfm.story.entity.story.Book;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @BelongsProject: story
 * @BelongsPackage: com.gfm.story.dao
 * @Author: Administrator
 * @CreateTime: 2019-06-03 15:21
 * @Description: ${Description}
 */
public interface BookDao extends BaseMapper<Book> {

    List<Book> getStoryPage(Map<String, Object> map);

    int getStoryPageCount(Map<String, Object> map);

    List<Book> getStoryListByIdsAndCategoryId(Map<String, Object> map);


    List<Book> getNewBook();

    List<Book> getBookListByCategory(@Param("categoryId") Long categoryId);

    List<Map> getStoryListByIdsAndCategoryName(Map<String, Object> map);

    int getStoryCountByIdsAndCategoryName(Map<String, Object> map);

    List<Book> getBookListByStatus(Map<String, Object> map);

    int getBookCountByStatus(Map<String, Object> map);

    List<Book> getNewBookList(Map<String, Object> map);

    int getNewBookCount(Map<String, Object> map);

    Book getRecommendHot();


    Book selectBookById(@Param("id") Long bookId,@Param("nameOrAuthor")String nameOrAuthor);
}
